#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n = 0;
	int m = 0;
	scanf("%d %d", &n, &m);
	int r = 0;
	r = n ^ m;
	int count = 0;
	while (r)
	{
		count++;
		r = r & (r - 1);
	}
	printf("%d", count);
	return 0;
}